package cn.jsj.hzu.qm.facecloud.ciuser.vo;

import java.util.Objects;

/**
 * 签到表视图的实体类
 * */
public class VCici {
	

//	 视图 SQL:
//	 （两重内连接，而不是WHERE子句）
//	 ==================================
//		SELECT 
//		tb_cici.id as `id`,
//		tb_cici.labid as `labid`,
//		tb_cici.userid as `userid`,
//		
//		tb_cilab.location as `lablocation`,
//		tb_cilab.`name` as `labname`,
//		
//		tb_ciuser.`name` AS `ciname`,
//		tb_ciuser.sid AS `sid`,
//		
//		tb_cici.ciin as `ciin`,
//		tb_cici.ciout as `ciout`,
//		tb_cici.ciinfo as `ciinfo`
//		FROM tb_cici 
//		
//		INNER JOIN tb_cilab 
//		ON tb_cilab.id=tb_cici.labid 
//		
//		INNER JOIN tb_ciuser 
//		ON tb_cici.userid=tb_ciuser.id 
//	==================================

	
	private int id;
	private int labid;
	private int userid;
	
	private String lablocation;
	private String labname;
	
	private String ciname;
	private String sid;
	
	private String ciin;
	private String ciout;
	
	private String ciinfo;

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getLabid() {
		return labid;
	}

	public void setLabid(int labid) {
		this.labid = labid;
	}

	public int getUserid() {
		return userid;
	}

	public void setUserid(int userid) {
		this.userid = userid;
	}

	public String getLablocation() {
		return lablocation;
	}

	public void setLablocation(String lablocation) {
		this.lablocation = lablocation;
	}

	public String getLabname() {
		return labname;
	}

	public void setLabname(String labname) {
		this.labname = labname;
	}

	public String getCiname() {
		return ciname;
	}

	public void setCiname(String ciname) {
		this.ciname = ciname;
	}

	public String getSid() {
		return sid;
	}

	public void setSid(String sid) {
		this.sid = sid;
	}

	public String getCiin() {
		return ciin;
	}

	public void setCiin(String ciin) {
		this.ciin = ciin;
	}

	public String getCiout() {
		if (ciout != null) {
			return ciout;
		}
		else {
			return "未签退";
		}
	}

	public void setCiout(String ciout) {
		this.ciout = ciout;
	}

	public String getCiinfo() {
		return ciinfo;
	}

	public void setCiinfo(String ciinfo) {
		this.ciinfo = ciinfo;
	}

	@Override
	public int hashCode() {
		return Objects.hash(ciin, ciinfo, ciname, ciout, id, labid, lablocation, labname, sid, userid);
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		VCici other = (VCici) obj;
		return Objects.equals(ciin, other.ciin) && Objects.equals(ciinfo, other.ciinfo)
				&& Objects.equals(ciname, other.ciname) && Objects.equals(ciout, other.ciout) && id == other.id
				&& labid == other.labid && Objects.equals(lablocation, other.lablocation)
				&& Objects.equals(labname, other.labname) && Objects.equals(sid, other.sid) && userid == other.userid;
	}

	@Override
	public String toString() {
		return "VCici [id=" + id + ", labid=" + labid + ", userid=" + userid + ", lablocation=" + lablocation
				+ ", labname=" + labname + ", ciname=" + ciname + ", sid=" + sid + ", ciin=" + ciin + ", ciout=" + ciout
				+ ", ciinfo=" + ciinfo + "]";
	}
	
	public String toJsonString() {
		return "{id:'" + id + "', labid:'" + labid + "', userid:'" + userid + "', lablocation:'" + lablocation
				+ "', labname:'" + labname + "', ciname:'" + ciname + "', sid:'" + sid + "', ciin:'" + ciin + "', ciout:'" + getCiout()
				+ "', ciinfo:'" + ciinfo + "'}";
	}

	public VCici(int id, int labid, int userid, String lablocation, String labname, String ciname, String sid,
			String ciin, String ciout, String ciinfo) {
		super();
		this.id = id;
		this.labid = labid;
		this.userid = userid;
		this.lablocation = lablocation;
		this.labname = labname;
		this.ciname = ciname;
		this.sid = sid;
		this.ciin = ciin;
		this.ciout = ciout;
		this.ciinfo = ciinfo;
	}

	public VCici() {
		super();
	}
	
	

}
